package com.bitbakery.plugin.lisp.lang.psi;

import com.bitbakery.plugin.lisp.lang.LispLanguage;
import com.intellij.lang.Language;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.IFileElementType;
import com.intellij.psi.tree.TokenSet;

public interface CLElementTypes {
    IFileElementType FILE = new IFileElementType(Language.findInstance(LispLanguage.class));

    IElementType VARIABLE_NAME = new CLElementType("variable name");
    IElementType VARIABLE_DEFINITION = new CLElementType("variable definition");
    IElementType GLOBAL_VARIABLE_DEFINITION = new CLElementType("global variable definition");
    IElementType GLOBAL_CONSTANT_DEFINITION = new CLElementType("global constant definition");

    IElementType ANONYMOUS_FUNCTION_DEFINITION = new CLElementType("anonymous function definition");
    IElementType FUNCTION_DEFINITION = new CLElementType("function definition");
    IElementType MACRO_DEFINITION = new CLElementType("macro definition");

    IElementType DOCSTRING = new CLElementType("docstring");

    IElementType FORMAL_PARAMETER_LIST = new CLElementType("formal parameter list");
    IElementType REGULAR_PARAMETER_LIST = new CLElementType("regular parameter list");
    IElementType KEYWORD_PARAMETER_LIST = new CLElementType("keyword parameter list");
    IElementType OPTIONAL_PARAMETER_LIST = new CLElementType("optional parameter list");

    IElementType REGULAR_PARAMETER = new CLElementType("regular parameter");
    IElementType KEYWORD_PARAMETER = new CLElementType("keyword parameter");
    IElementType OPTIONAL_PARAMETER = new CLElementType("optional parameter");
    IElementType REST_PARAMETER = new CLElementType("rest parameter");

    IElementType FUNCTION_CALL = new CLElementType("function call");
    IElementType FUNCTION_NAME = new CLElementType("function name");

    IElementType FUNCTION_BODY = new CLElementType("function body");

    IElementType ARGUMENT_LIST = new CLElementType("argument list");
    IElementType ARGUMENT = new CLElementType("argument");

    IElementType BACKQUOTED_EXPRESSION = new CLElementType("backquoted expression");

    IElementType COND_STATEMENT = new CLElementType("cond statement");
    IElementType IF_STATEMENT = new CLElementType("if statement");
    IElementType LET_STATEMENT = new CLElementType("let statement");
    IElementType LET_VARIABLE_NAME = new CLElementType("let variable name");

    // ????
    TokenSet SOURCE_ELEMENTS = TokenSet.create(
            FUNCTION_DEFINITION, MACRO_DEFINITION
    );
}
